﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommandPattern
{
    /// <summary>
    /// 场景类，通常就是我们的客户端
    /// </summary>
    class Client
    {
        public Client()
        {
            //首先声明调用者
            Invoker invoker = new Invoker();
            //定义接收者
            Receiver receiver = new ConcreteReceiver1();
            //定义一个发送给接受者的命令
            Command command = new ConcreteCommand1(receiver);
            //把命令交给调用者去执行
            invoker.Command = command;
            invoker.Action();
        }

        internal Invoker Invoker
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }

        internal Receiver Receiver
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }

        internal Command Command
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }
    }
}
